package pub.xspace.nova.common.domain;

import java.io.Serializable;

/**
 * 统一返回对象
 * 
 * @author HeJianrong
 */
public class AjaxResult implements Serializable {

	/**
	 * 序列化ID
	 */
	private static final long serialVersionUID = -6863508435061124580L;
	private int code;
	private String msg;
	private Object data;

	/**
	 * 空构造函数
	 */
	public AjaxResult() {
	}

	/**
	 * 全参数构造函数
	 * 
	 * @param code
	 * @param msg
	 * @param data
	 */
	public AjaxResult(int code, String msg, Object data) {
		this.code = code;
		this.msg = msg;
		this.data = data;
	}

	/**
	 * 构造函数
	 * 
	 * @param code
	 * @param msg
	 */
	public AjaxResult(int code, String msg) {
		this.code = code;
		this.msg = msg;
		this.data = null;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

}
